package com.mocksamples
{
    import flexunit.framework.TestCase;
    import flexunit.framework.TestSuite;
    
    import com.mocksamples.greeting.GreetingTest;
    import com.mocksamples.subscriber.PublisherTest;
    import com.mocksamples.banksystem.BankSystemTest;
    import com.mocksamples.cache.TimedCacheTest;
    
    public class AllTests extends TestCase
	{
	
        public function AllTests(methodName : String){
            super(methodName);
        }
            
		public static function suite():TestSuite{
	    	var myTS:TestSuite = new TestSuite();
    		// mock samples  tests
    		myTS.addTest(new GreetingTest("greetInSomeLanguage"));
    		myTS.addTest(new GreetingTest("greetInEnglish"));
    		myTS.addTest(new GreetingTest("dontCallTranslatorWhenLanguageIsEnglish"));

    		myTS.addTest(new PublisherTest("subscriberReceivesMessage"));
    		myTS.addTest(new PublisherTest("onlyTheLasSubscriberReceivesTheMessage"));
    		myTS.addTest(new PublisherTest("canPublishEvenWithoutASubscriber"));

    		myTS.addTest(new BankSystemTest("verifyTransferForSameCurrencies"));
    		myTS.addTest(new BankSystemTest("verifyTransferForDifferentCurrencies"));
    		myTS.addTest(new BankSystemTest("shouldNotTransferIfInsufficientFunds"));
	 
    		myTS.addTest(new TimedCacheTest("shouldLoadAnObjectWhenTheObjectHasNeverBeenLoaded"));
    		myTS.addTest(new TimedCacheTest("shouldReloadAnObjectWhenThePolicyDecidesTheTimeHasExpired"));
    		myTS.addTest(new TimedCacheTest("shouldNotReloadAnObjectWhenThePolicySaysNotTo"));
	 
	    	return myTS;
		}
        
	}
}
	